package com.monkey.thread;

/**
 * @Author MonkeyBrother
 * @Date 2020/12/17 22:54
 * @Desc
 **/
public class MyObject {
    static Object lock = new Object();
    static boolean flag = true;

    public static void sayWait() {
        synchronized (lock) {
            while (flag) {
                System.out.println("waiting......");
            }
        }
    }

    public static void sayNotify() {

    }
}


